package weapon

import (
	"fmt"
	"ys.calc/pointFunction"
	"ys.calc/role"
)

func InitHarpoon(refineLevel float64, times float64) Weapon {
	var subStatValue = 45.9
	var mainStateValue = 510.0
	return Weapon{
		Name:     fmt.Sprintf("精%d渔获%d层", int(refineLevel), int(times)),
		Atk:      mainStateValue,
		Code:     4,
		SubState: subStatValue,
		SubStateFunc: func(r *role.Role) {
			pointFunction.AddRecharge(subStatValue, r)
		},
		SpFunc: func(r *role.Role) {
			HarpoonSp(refineLevel, times, r)
		},
	}
}
func HarpoonSp(refineLevel float64, times float64, r *role.Role) {
	bonus := 1 + (refineLevel-1)*0.25
	r.CritRate += bonus * 6
	r.Increase += bonus * 16
}
